package com.ruoyi.project.lely.bean.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

/**
 * 用户表单
 *
 * @author luoyong
 */
@Data
@ApiModel("用户表单 入参DTO")
public class LyUserFormidDTO {

    @ApiModelProperty("ID")
    private Long id;

    @Length(max = 63, message = "缓存的FormId长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("缓存的FormId")
    private String formId;

    @NotNull
    @ApiModelProperty("是FormId还是prepayId")
    private Integer isprepay;

    @NotNull
    @ApiModelProperty("可用次数，fromId为1，prepay为3，用1次减1")
    private Integer useAmount;

    @NotNull
    @ApiModelProperty("过期时间，腾讯规定为7天")
    private LocalDateTime expireTime;

    @Length(max = 63, message = "微信登录openid长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("微信登录openid")
    private String openId;

}
